$(function(){
	$('.delete-list').on('click',function(){
		popup(this,"{:url('delete')}");
		
	});
	
	$('.startusing').on('click',function(){
		popup(this,"{:url('state')}");
	});
	$('.forbidden').on('click',function(){
		popup(this,"{:url('state')}");
	});
	$('.choose').on('click', function() {
		var index = parent.layer.getFrameIndex(window.name); 
		console.log($(this).data('name'))
		parent.$('.car_rental').val($(this).data('name'));
		parent.$('.car_rental_id').val($(this).data('id'));
		parent.layer.close(index);
	});
	$('.driver').on('click', function() {
		department("{:url('driver/index',['op'=>'search','car_rental_id'=>$item.car_rental_id])}")
	});
	$('.car').on('click', function() {
		department("{:url('car/index',['op'=>'search','car_rental_id'=>$item.car_rental_id])}")
	});
	//删除多个
	$(".delete-multiple").on('click',function(){
		popup(this,"{:url('delete')}");
	});
	$('input[type=checkbox').on('click', function() {
		checkall(this)
	});
})
